package heap;

import java.util.PriorityQueue;

public class Test {

    public static void main(String[] args) {
        PriorityQueue<Integer> priorityQueue = new PriorityQueue<>();//默认小根堆
        priorityQueue.offer(10);
        priorityQueue.offer(20);
        priorityQueue.offer(50);
        System.out.println(priorityQueue.peek());
    }
    public static void main1(String[] args) {
        int[] array = {27,15,19,18,28,34,65,49,25,37};
        TestHeap testHeap = new TestHeap();
        testHeap.printHeap(array);

        testHeap.init(array);
        testHeap.createHeap(array);

        testHeap.offer(80);
    }
}





